package com.foss.base;

import android.os.Environment;
import com.foreveross.chameleon.exhibition.BuildConfig;
import com.foreveross.chameleon.exhibition.R;
import com.foss.utils.AndroidTool;

/**
 * 配置文件，常量
 */
public class BslConfig {

    static {
        String mod = BslApplication.getInstance().getString(R.string.build_config_sandbox);
        IS_SANDBOX = "sandbox".equals(mod);
    }

    // these values must be init first
    public static final boolean IS_SANDBOX;

    // direct definition
    // public static final String UTF8 = "UTF-8";
    // public static final String PKG_NAME = AndroidTool.getPkgName();
    public static final String SD_CARD = Environment.getExternalStorageDirectory().getAbsolutePath();
    public static final String AES_PASSWORD = BuildConfig.AES_PASSWORD;

    // defined by called other const
    public static final String APP_FOLDER_IN_SD = SD_CARD + "/" + AndroidTool.getPkgName();
    public static final String WWW_FOLDER_IN_SD = APP_FOLDER_IN_SD + "/www";
    public static final String ASSETS_FOLDER_AFTER_SCHEME = "/file:///android_asset/";
    public static final String ASSETS_WWW_FOLDER = "file:///android_asset/www";

    // key for sth
    public static final String SP_KEY_APPVERSION = "appVersion";
    public static final String SP_KEY_FIRST_INSTALL = "firstInstall";

    // provider的authorities 从xml中读取
    public static final String AUTH_PROVIDER_CRYPT = BslApplication.getInstance().getString(R.string.providerAuth);
    public static final String SCHEME_PROVIDER = "content://" + AUTH_PROVIDER_CRYPT;
    //public static final String AUTH_PROVIDER_CRYPT = "com.foss.chameleon.provider.crypt";
    //public static final String SCHEME_PROVIDER = "content://com.foss.chameleon.provider.crypt";
}
